﻿//Orginal date made: 4th March 2012
//Creator: by Luke Bermingham

//Last modified:
//Modifier name:


using System.Windows;
using System.Windows.Input;
using SharedResources.ViewModel;

namespace MainModule.ViewModel
{
    class FileDialogViewModel:BaseViewModel
    {
        //This class is used for the GUI logic under the Menu>>File dialog

        private void CloseProgram()
        {
            Application.Current.Shutdown();
        }

        private RelayCommand _exitCommand; //set private member
        public ICommand ExitCommand //public field used by xaml binding
        {
            get
            {
                return _exitCommand = MakeCommandSafely(_exitCommand, () => CloseProgram());
                //returning a type relay command here is allowed because it is actually (next line)
                //by polymorphism a type of ICommand
            }
        }
    }
}
